filetype on " 自动检测文件类型
filetype on " 自动检测文件类型
filetype plugin indent on
set autoindent                 "自动缩排
set cindent
set shiftwidth=4
set tabstop=4
set softtabstop=4
set expandtab                  "将tab替换为相应数量空格
set smartindent

set encoding=utf8 "设置编码为utf8
set fileencoding=utf8
set fileencodings=uft8-bom,utf8,gbk
set fileformat=unix "设置文件格式
set fileformats=unix,dos,mac
au BufNewFile,BufRead *.lbi setf html

set ignorecase " 搜索模式里忽略大小写
set smartcase " 如果搜索模式包含大写字符，不使用 'ignorecase' 选项。只有在输入搜索模式并且打开 'ignorecase' 选项时才会使用。
set hlsearch                  "高亮度反白
set incsearch " 输入字符串就显示匹配点

syntax on                     "进行语法检验，颜色显示
syntax enable
set re=1
set lazyredraw
set synmaxcol=2048  "设置语法着色的最大列数"
syntax sync minlines=10256

" 记住上次编辑位置"
autocmd BufReadPost * if line("'\"")>0&&line("'\"")<=line("$") | exe "normal g'\"" | endif

"set list
set nu                        "可以在每一行的最前面显示行号
set wrap                      "自动折行
set linebreak " 整词换行
set showmatch " 设置匹配模式，显示匹配的括号
set showmode " 命令行显示vim当前模式

set nobackup " 注释后表示有自动备份
set noswapfile " 不注释表示禁止自动备份
set nocompatible " 不兼容vi命令
set showcmd " 命令行显示输入的命令

"set ruler                      "可显示最后一行的状态
"set whichwrap=b,s,<,>,[,] " 光标从行首和行末时可以跳到另一行去

set laststatus=2    "总是显示状态栏
set cursorline      "高亮显示当前行

"代码折叠
" Enable folding 代码折叠 空格键切换折叠
set foldmethod=indent
set foldlevel=99
nnoremap <space> za

"let php_folding=2
let &t_TI=''
let &t_TE=''

set t_Co=256
"if has("termguicolors")
"    " fix bug for vim
"    " enable true color
"    set termguicolors
"endif
set background=dark
"colorscheme elflord  " 更适合php
"colorscheme desert
"colorscheme monokai
colorscheme solarized8

call plug#begin()
Plug 'https://gitee.com/tbq-vim/coc.nvim.git', {'branch': 'release'}
Plug 'yaegassy/coc-blade', {'do': 'yarn install --frozen-lockfile'}
Plug 'https://gitee.com/tbq-vim/coc-volar.git', { 'do': 'yarn install --frozen-lockfile' }
Plug 'https://gitee.com/tbq-vim/coc-volar-tools.git', { 'do': 'yarn install --frozen-lockfile' }

Plug 'doctorfree/SetColorSchemes.vim'
Plug 'NLKNguyen/papercolor-theme'
Plug 'drewtempelmeyer/palenight.vim'
Plug 'tomasiser/vim-code-dark'
Plug 'joshdick/onedark.vim'
Plug 'sonph/onehalf', {'rtp': 'vim/'}
Plug 'ajmwagar/vim-deus'
Plug 'sainnhe/gruvbox-material'
Plug 'nanotech/jellybeans.vim'
Plug 'sainnhe/sonokai'
Plug 'morhetz/gruvbox'
Plug 'https://gitee.com/tbq-vim/vim-vue.git'
call plug#end()

"<F7> Previous colorscheme and airline theme
"<F8> Next colorscheme and airline theme
"<F9> Random colorscheme and airline theme
let g:mycolorschemes = ['elflord', 'desert', 'default', 'monokai', 'codedark', 'palenight', 'PaperColor', 'solarized8', 'deus', 'onehalfdark', 'onedark', 'gruvbox', 'solarized8_flat', 'solarized8_high', 'solarized8_low', 'sonokai', 'jellybeans', 'gruvbox-material']
let g:setairlinetheme = 0
let g:echosetcolor = 1

source ~/.vim/vimrc_lang_python
source ~/.vim/vimrc_lang_front

source ~/.vim/vimrc_plugin_common_taglist
source ~/.vim/vimrc_plugin_common_nerdtree
source ~/.vim/vimrc_plugin_common_bufExplorer
source ~/.vim/vimrc_plugin_common_gutentags
source ~/.vim/vimrc_plugin_common_leaderf
source ~/.vim/vimrc_plugin_common_other
source ~/.vim/vimrc_plugin_phpunit
source ~/.vim/vimrc_plugin_phpfmt
source ~/.vim/vimrc_plugin_php_namespace
source ~/.vim/vimrc_plugin_phpqa
"source ~/.vim/vimrc_plugin_php_refactoring_toolbox
